// 景点门票相关接口
import request from '@/util/request.js'

// 获取城市列表
export const getCities = () =>
  request.get('attractions/cities')

// 获取景点类型列表
export const getTypes = () =>
  request.get('attractions/types')

// 获取景点列表
export const getAttractionsList = (params) =>
  request.get('attractions/list', { params })

// 获取景点详情
export const getAttractionDetail = (id) =>
  request.get(`attractions/detail/${id}`)

// 搜索景点
export const searchAttractions = (keyword, params) =>
  request.get('attractions/search', { params: { keyword, ...params } })

// 获取热门景点
export const getHotAttractions = (params) =>
  request.get('attractions/hot', { params })

// 预订门票
export const bookTicket = (data) =>
  request.post('attractions/book', data)

// 获取景点相关攻略
export const getRelatedGuides = (attractionId, params) =>
  request.get(`attractions/${attractionId}/guides`, { params })
